package designMode.singleTon;

/**
 * @program: jvm
 * @description  饿汉模式优化版   只有getInstance()时才会装载单例类
 * @author: tkk fendoukaoziji
 * @create: 2019-03-13 09:40
 **/
public class InnerSingle {
    private static class SingleHodler{
        private static final InnerSingle instance=new InnerSingle();
    }
    private InnerSingle(){};
    public static final InnerSingle getInstance(){
        return SingleHodler.instance;
    }
}
